3.31 \(\int \frac{\cos (x)}{a+b \cos ^2(x)} \, dx\)

Optimal. Leaf size=29 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a+b}}\right )}{\sqrt{b} \sqrt{a+b}} \]

[Out]

ArcTanh[(Sqrt[b]*Sin[x])/Sqrt[a + b]]/(Sqrt[b]*Sqrt[a + b])

________________________________________________________________________________________

Rubi [A]  time = 0.030828, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3186, 208} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a+b}}\right )}{\sqrt{b} \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]/(a + b*Cos[x]^2),x]

[Out]

ArcTanh[(Sqrt[b]*Sin[x])/Sqrt[a + b]]/(Sqrt[b]*Sqrt[a + b])

Rule 3186

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cos (x)}{a+b \cos ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{a+b-b x^2} \, dx,x,\sin (x)\right )\\ &=\frac{\tanh ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a+b}}\right )}{\sqrt{b} \sqrt{a+b}}\\ \end{align*}

Mathematica [A]  time = 0.0112525, size = 29, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a+b}}\right )}{\sqrt{b} \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]/(a + b*Cos[x]^2),x]

[Out]

ArcTanh[(Sqrt[b]*Sin[x])/Sqrt[a + b]]/(Sqrt[b]*Sqrt[a + b])

________________________________________________________________________________________

Maple [A]  time = 0.011, size = 21, normalized size = 0.7 \begin{align*}{{\it Artanh} \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/(a+b*cos(x)^2),x)

[Out]

1/((a+b)*b)^(1/2)*arctanh(b*sin(x)/((a+b)*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+b*cos(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.78319, size = 228, normalized size = 7.86 \begin{align*} \left [\frac{\log \left (-\frac{b \cos \left (x\right )^{2} - 2 \, \sqrt{a b + b^{2}} \sin \left (x\right ) - a - 2 \, b}{b \cos \left (x\right )^{2} + a}\right )}{2 \, \sqrt{a b + b^{2}}}, -\frac{\sqrt{-a b - b^{2}} \arctan \left (\frac{\sqrt{-a b - b^{2}} \sin \left (x\right )}{a + b}\right )}{a b + b^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+b*cos(x)^2),x, algorithm="fricas")

[Out]

[1/2*log(-(b*cos(x)^2 - 2*sqrt(a*b + b^2)*sin(x) - a - 2*b)/(b*cos(x)^2 + a))/sqrt(a*b + b^2), -sqrt(-a*b - b^
2)*arctan(sqrt(-a*b - b^2)*sin(x)/(a + b))/(a*b + b^2)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+b*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.12551, size = 42, normalized size = 1.45 \begin{align*} -\frac{\arctan \left (\frac{b \sin \left (x\right )}{\sqrt{-a b - b^{2}}}\right )}{\sqrt{-a b - b^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+b*cos(x)^2),x, algorithm="giac")

[Out]

-arctan(b*sin(x)/sqrt(-a*b - b^2))/sqrt(-a*b - b^2)